package com.share.alibaba.auser.web;

import com.share.alibaba.auser.model.po.AccessLog;
import com.share.alibaba.auser.service.AccessLogService;
import com.share.common.common.Result;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.xml.ws.soap.Addressing;

@Slf4j
@Api("通用模块")
@RestController
public class CommonController {
    @Autowired
    private AccessLogService accessLogService;

    @RequestMapping("/saveAccessLog")
    public Result saveAccessLog(@RequestBody AccessLog accessLog) {
        return Result.insertOrDeleteOrUpdate(accessLogService.insert(accessLog));
    }
}
